/*
 * This file is part of GuitarMaster.
 * 
 * GuitarMaster is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * GuitarMaster is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.paris5.master2.guitarmaster.service;

import com.paris5.master2.guitarmaster.bean.*;
import com.paris5.master2.guitarmaster.exception.EcomException;
import com.paris5.master2.guitarmaster.exception.EcomQueryException;
import com.paris5.master2.guitarmaster.exception.EcomValidationException;
import javax.ejb.Remote;

/*
 * $Id: ServiceAdminRemote.java 49 2013-04-10 08:54:38Z nedjahi.mourad@gmail.com $
 * 
 * $HeadURL: http://com-paris5-master2-guitarmaster-distrib.googlecode.com/svn/trunk/com.paris5.master2.guitarmaster.distrib/src/com/paris5/master2/guitarmaster/service/ServiceAdminRemote.java $
 * $Revision: 49 $
 * $Date: 2013-04-10 08:54:38 +0000 (Wed, 10 Apr 2013) $
 * $Author: nedjahi.mourad@gmail.com $
 */

/**
 * //TODO : Add desciption
 *
 * @author Leticia Mahamed, Alice Khammy, mourad nedjahi, Saliou Mamadou Barry
 */
@Remote
public interface ServiceAdminRemote {

    public void addProduct(EcomProduct bean) throws EcomValidationException;
    public void addProductType(EcomProductType bean) throws EcomValidationException;
    public void updateProduct(EcomProduct bean)throws EcomValidationException; 
    public void addCategory(EcomCategory bean)throws EcomValidationException;
    public void addStore(EcomStore bean)throws EcomValidationException;
    public void addCountry(EcomCountry bean) throws EcomValidationException;
    public Float getStoreBalance(EcomStore bean)throws EcomValidationException;
    public void depositAmount(EcomStore bean, Float amount)throws EcomValidationException;
    public void withdrawStoreBalance(EcomStore bean, Float amount)throws EcomValidationException;
    public void setProductToAuction(EcomUser user, EcomProduct bean, float price)throws EcomValidationException,EcomQueryException,EcomException;
    public void updateCountry(EcomCountry bean) throws EcomValidationException;
    public void updateCategory(EcomCategory bean) throws EcomValidationException;
    public void removeCountry(EcomCountry bean) throws EcomValidationException;
    public void removeCategory(EcomCategory bean) throws EcomValidationException; 
    
        
    /**
     * 
     * @param id
     * @return 
     */
    public EcomStore findStore(int id);

    /**
     * 
     * @param categ
     * @return
     * @throws EcomQueryException 
     */
    public EcomCategory findCategory(String categ) throws EcomQueryException;
    
    /**
     * 
     * @param id
     * @return 
     */
    public EcomCategory findCategory(Integer id);

    /**
     * 
     * @param id
     * @return 
     */
    public EcomCountry findCountry(String id);

    /**
     * 
     * @param store
     * @return
     * @throws EcomQueryException 
     */
    public EcomStore findStore(String name) throws EcomQueryException;

    /**
     * 
     * @param bean
     * @throws EcomValidationException 
     */
    public void removeStore(EcomStore bean) throws EcomValidationException;

    /**
     * 
     * @param bean
     * @throws EcomValidationException 
     */
    public void updateStore(EcomStore bean) throws EcomValidationException;

    /**
     * 
     * @param title
     * @return
     * @throws EcomQueryException 
     */
    public EcomProductType findProductType(String title) throws EcomQueryException;

    /**
     * 
     * @param bean
     * @throws EcomValidationException 
     */
    public void removeProductType(EcomProductType bean) throws EcomValidationException;

    /**
     * 
     * @param bean
     * @throws com.paris5.master2.guitarmaster.exception.EcomValidationException 
     */
    public void removeProduct(EcomProduct bean) throws EcomValidationException;

    /**
     * 
     * @param bean
     * @throws com.paris5.master2.guitarmaster.exception.EcomValidationException 
     */
    public void updateProductType(EcomProductType bean) throws EcomValidationException;

    /**
     * 
     * @param bean
     * @throws EcomValidationException
     * @throws EcomQueryException
     * @throws EcomException 
     */
    public void endProductToAuction(EcomProduct bean)throws EcomValidationException,EcomQueryException,EcomException;
}
